<?php
/* @var $this UserController */
/* @var $model User */
/* @var $form CActiveForm */
?>

<?php if(Yii::app()->user->hasFlash('register')): ?>

<div class="flash-success">
	<?php echo Yii::t('user_messages',Yii::app()->user->getFlash('register')); ?>
</div>

<?php else: ?>

<div class="form">

<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm', array(
	'id'=>'register-form',
	// Please note: When you enable ajax validation, make sure the corresponding
	// controller action is handling ajax validation correctly.
	// There is a call to performAjaxValidation() commented in generated controller code.
	// See class documentation of CActiveForm for details on this.
	'enableAjaxValidation'=>false,
)); ?>

	
	<?php echo $form->errorSummary($model); ?>

	<?php echo  $form->textFieldControlGroup($model,'username',array('span'=>5,'maxlength'=>128)); ?>
	
	<?php echo  $form->textFieldControlGroup($model,'fullname',array('span'=>5,'maxlength'=>256)); ?>
	
	 <?php echo $form->passwordFieldControlGroup($model,'password',array('span'=>5,'maxlength'=>128)); ?>
	
	<?php echo $form->passwordFieldControlGroup($model,'password_repeat',array('span'=>5,'maxlength'=>128)); ?>
	
	<?php echo $form->textFieldControlGroup($model,'email',array('span'=>5,'maxlength'=>128)); ?>
	
	<?php echo $form->textFieldControlGroup($model,'mobile',array('span'=>5,'maxlength'=>20)); ?>
	

	<?php if(CCaptcha::checkRequirements()): ?>
		
		<?php echo $form->textFieldControlGroup($model, 'verifyCode', array(
		  'controlOptions' => array('before' => $this->widget('CCaptcha', array('captchaAction' => 'site/captcha'), true) . '<br/>'),
		)); ?>
	<?php endif; ?>
	
    
	<div class="row buttons">
        <?php echo TbHtml::submitButton(Yii::t('user_messages','Register'),  array('color' => TbHtml::BUTTON_COLOR_PRIMARY,));?>
    </div>
	
<?php $this->endWidget(); ?>

</div><!-- form -->
<?php endif; ?>	
	